/*
 * Copyright 2009 Jesse McLaughlin (nzjess@gmail.com)
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *         http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.travelfusion.xmlclient.ri.xobject.plane;

import org.travelfusion.xmlclient.util.TimeZoneDelta;
import org.travelfusion.xmlclient.xobject.XRequestBean;

/**
 * Represents a CheckRouting command, which is used to poll for results generated due to a previous
 * {@link XStartRoutingRequest} command.
 * 
 * @author Jesse McLaughlin (nzjess@gmail.com)
 */
public class XCheckRoutingRequest extends XRequestBean implements TimeZoneDelta {

  private static final long serialVersionUID = 1L;

  private String routingId;

  private boolean segmentsEnabled = true;

  public String getRoutingId() {
    return routingId;
  }

  /**
   * The routing ID is obtained from the response to a previous {@link XStartRoutingRequest} command.
   */
  public void setRoutingId(String routingId) {
    this.routingId = routingId;
  }

  public boolean isSegmentsEnabled() {
    return segmentsEnabled;
  }

  /**
   * If you are not interested in the detailed {@link XFlightSegment} information returned by this command, set this to
   * <code>false</code> (eg. to save on bandwidth). Defaults to <code>true</code>.
   */
  public void setSegmentsEnabled(boolean segmentsEnabled) {
    this.segmentsEnabled = segmentsEnabled;
  }

  @Deprecated
  public int getTZDeltaMinutes() {
    return 0;
  }

  /**
   * If required, set this to the number of minutes (plus or minus) between the timezone of the system where the
   * response data will be used, and the timezone of the system invoking the TRAVELfusion TripPlanner XML service.
   * <p>
   * This value can normally be left as zero (the default), but it can be useful where the data will be transported
   * across a protocol that does not propagate timezone information (eg. GWT RPC).
   */
  @Deprecated
  public void setTZDeltaMinutes(int tzDeltaMinutes) {
  }
}
